<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./../../Template/generalTemplate.xhtml">


            <ui:define name="content"> 

                <h:form id="form2" prependId="false">
                    <p:panel id="product" header="Add New Product" style="height:495px;">
                        <div style="margin-top:80px;margin-left:100px;">
                            <h:panelGrid id="grid" columns="6">

                                <h:outputText value="Product A" />
                                <p:inputText  id="productA" value="#{createProductManagedBean.productNameA}" />
                                <h:outputText value="Basic Price" />
                                <p:inputText  id="bpA" value="#{createProductManagedBean.basicPriceA}" />
                                <h:outputText value="Promotion Price" />
                                <p:inputText  id="ppA" value="#{createProductManagedBean.promotionPriceA}"/>

                                <h:outputText value="Product B" />
                                <p:inputText  id="productB" value="#{createProductManagedBean.productNameB}" />
                                <h:outputText value="Basic Price" />
                                <p:inputText  id="bpB" value="#{createProductManagedBean.basicPriceB}" />
                                <h:outputText value="Promotion Price" />
                                <p:inputText  id="ppB" value="#{createProductManagedBean.promotionPriceB}" />

                                <h:outputText value="Product C" />
                                <p:inputText  id="productC" value="#{createProductManagedBean.productNameC}" />
                                <h:outputText value="Basic Price" />
                                <p:inputText  id="bpC" value="#{createProductManagedBean.basicPriceC}" />
                                <h:outputText value="Promotion Price" />
                                <p:inputText  id="ppC" value="#{createProductManagedBean.promotionPriceC}" />

                                <h:outputText value="Product D" />
                                <p:inputText  id="productD" value="#{createProductManagedBean.productNameD}" />
                                <h:outputText value="Basic Price" />
                                <p:inputText  id="bpD" value="#{createProductManagedBean.basicPriceD}" />
                                <h:outputText value="Promotion Price" />
                                <p:inputText  id="ppD" value="#{createProductManagedBean.promotionPriceD}" />

                                <p:commandButton value="Create"  ajax="false"  update="statusMessages" actionListener="#{createProductManagedBean.saveNewProduct}"/>



                            </h:panelGrid>
                        </div>
                    </p:panel>
                </h:form>
            </ui:define>

            <ui:define name="bottom">
                <p:messages id="statusMessages"/>
            </ui:define>
            

        </ui:composition>

    </body>
</html>
